package com.springstudy.mybatisplus.service;

import com.springstudy.mybatisplus.api.CareerService;
import com.springstudy.mybatisplus.dao.CareerMapper;
import com.springstudy.mybatisplus.entity.Career;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author chenrongrong
 * @since 2020/3/9 9:58
 */
@Service
public class CareerServiceImp implements CareerService {

    @Autowired
    CareerMapper mapper;

    @Override
    public Career get(Long id) {
        //直接调用父类的selectById方法
        return mapper.selectById(id);
    }

    @Override
    public List<Long> getCareerIdList() {
        //调用自定义的selectIdList方法
        return mapper.selectIdList();
    }

    @Override
    public List<Career> getListWithPerson() {
        //调用自定义的selectListWithPerson方法
        return mapper.selectListWithPerson();
    }


}
